<!doctype html>
<html>
<head>
    <title>{{$title}}</title>
    <meta charset="utf-8">
    <link rel="shortcut icon" type="image/ico" href="{{asset('/favicon.ico')}}">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    <meta name="keywords" content="{{\Illuminate\Support\Facades\Config::get('web.keywords')}}" />
    <meta name="description" content="{{\Illuminate\Support\Facades\Config::get('web.describe')}}" />
    <link rel="stylesheet" href="{{asset('assets/css/amazeui.min.css')}}">
    <link rel="stylesheet" href="{{asset('assets/css/wap.css')}}">
    <link rel="stylesheet" href="{{asset('assets/wangEditor/css/wangEditor.min.css')}}">
    <style>
        .pet_more_list_show{height:100%;}
    </style>
    {{--    <link rel="stylesheet" href="{{asset('assets/css/loader.css')}}">--}}
    <script src="{{asset('assets/js/jquery.min.js')}}"></script>
    {{--<script>
        // 等待所有加载
        $(window).load(function(){
            $('body').addClass('loaded');
            $('#loader-wrapper .load_title').remove();
        });
    </script>--}}

    <script type="text/javascript" src="{{asset('assets/js/jquery.lazyload.js')}}"></script>
    <script type="text/javascript">
        // 声明变量名 var;
        var Img = "{{asset('assets/images/lazyload.gif')}}";
        $(function(){$("img").lazyload({placeholder:Img,effect:"fadeIn"});});
    </script>
    <title>{{$title}}</title>
</head>
<body style="background:#ececec">
{{--<div id="loader-wrapper">
    <div id="loader"></div>
    <div class="loader-section section-left"></div>
    <div class="loader-section section-right"></div>
    <div class="load_title">请稍等哦(๑•̀ㅂ•́)و✧</div>
</div>--}}
<div class="pet_mian" >
    <div class="pet_head">
        <header data-am-widget="header"
                class="am-header am-header-default pet_head_block">
            <div class="am-header-left am-header-nav ">
                <a onclick="history.go(-1)" class="iconfont pet_head_jt_ico">&#xe601;</a>
            </div>

            <h1 class="am-header-title pet_article_user">
                @if(!empty($authorinfo))
                    <a href="">
                <span class="pet_article_user_ico"><img src="
                @if(empty($authorinfo->avatar))
                    {{asset('assets/images/home/a1.png')}}
                    @else
                    {{$authorinfo->avatar}}
                    @endif
                            " alt="" class=""></span>
                        <span class="pet_article_user_name">{{$authorinfo->username}}</span>
                    </a>
                @endif
                @if(!empty($title) && empty($authorinfo))
                    <span class="pet_article_user_name">{{mb_substr($title,0,9,'utf-8')}}</span>
                @endif
            </h1>

            <div class="am-header-right am-header-nav">
                <a href="javascript:;" class="iconfont pet_head_gd_ico">&#xe600;</a>
            </div>
        </header>
    </div>



    <div class="pet_more_list"><div class="pet_more_list_block">
            <div class="iconfont pet_more_close">×</div>
            <div class="pet_more_list_block">
                <div class="pet_more_list_block_name">
                    <div class="pet_more_list_block_name_title">文章类</div>
                    @foreach($Num[6][1] as $v)
                        <a class="pet_more_list_block_line" href="{{url('articlelist/1/'.$v['id'])}}">
                            <div class="pet_more_list_block_line_font">{{$v['category']}}</div>
                        </a>
                    @endforeach
                    <div class="pet_more_list_block_name_title">图片类</div>
                    @foreach($Num[6][2] as $v)
                        <a class="pet_more_list_block_line" style="text-align: center;" href="{{url('imagelist/1/'.$v['id'])}}">
                            <div class="pet_more_list_block_line_font">{{$v['category']}}</div>
                        </a>
                    @endforeach


                    <div class="pet_more_list_block_name_title pet_more_list_block_line_height">服务 Service</div>
                    @if(!Session::get('user'))
                        <a class="pet_more_list_block_line" href="{{url('login')}}">
                            {{--<i class="iconfont pet_nav_xinxianshi pet_more_list_block_line_ico">&#xe61e;</i>--}}
                            <div class="pet_more_list_block_line_font">登录</div>
                        </a>
                        <a class="pet_more_list_block_line" href="{{url('forget')}}">
                            <!-- <i class="iconfont pet_nav_kantuya pet_more_list_block_line_ico">&#xe62c;</i> -->
                            <div class="pet_more_list_block_line_font">忘记密码</div>
                        </a>
                        <a class="pet_more_list_block_line" href="{{url('register')}}">
                            {{--<i class="iconfont pet_nav_zhangzhishi pet_more_list_block_line_ico">&#xe607;</i>--}}
                            <div class="pet_more_list_block_line_font">注册</div>
                        </a>
                    @else
                        <a class="pet_more_list_block_line" href="{{url('usercenter')}}">
                            {{--<i class="iconfont pet_nav_zhangzhishi pet_more_list_block_line_ico">&#xe607;</i>--}}
                            <div class="pet_more_list_block_line_font">个人中心</div>
                        </a>
                        <a class="pet_more_list_block_line" href="{{url('logout')}}">
                            {{--<i class="iconfont pet_nav_zhangzhishi pet_more_list_block_line_ico">&#xe607;</i>--}}
                            <div class="pet_more_list_block_line_font">退出登录</div>
                        </a>
                    @endif
                    <a class="pet_more_list_block_line" data-am-modal="{target: '#doc-modal-1765', closeViaDimmer: 0, width: 330, height: 245}">
                        {{--<i class="iconfont pet_nav_zhangzhishi pet_more_list_block_line_ico">&#xe607;</i>--}}
                        <div class="pet_more_list_block_line_font">问题反馈</div>
                    </a>
                </div>
            </div>

        </div></div>

    <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1765" style="z-index: 999999999;">
        <div class="am-modal-dialog">
            <div class="am-modal-hd"><span id="commentTitle">问题反馈</span>
                <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
            </div>
            <input type="hidden" name="cid" value="">
            <div class="am-modal-bd">
                <div class="am-form-group">
                    <textarea class="fddsTextarea" rows="5" style="width:100%" id="dodfhd" style="border: beige;"></textarea>
                </div>
                <a class="am-btn am-btn-xs am-btn-danger" style="float: left;margin-left: 15%;" data-am-modal-close>取消</a>
                <button class="am-btn am-btn-xs am-btn-primary" style="float: right;margin-right: 15%;" onclick="postfan()">提交</button>
            </div>
        </div>
    </div>

    <div class="pet_content">
        @yield('content')

        <div class="pet_article_footer_info">{{\Illuminate\Support\Facades\Config::get('web.binfo')}}</div>
    </div>
</div>
<div data-am-widget="gotop" class="am-gotop am-gotop-fixed">
    <a href="#top" title="">
        <img class="am-gotop-icon-custom" src="{{asset('assets/images/home/goTop.png')}}" />
    </a>
</div>
<script src="{{asset('assets/js/amazeui.min.js')}}"></script>
<script type="text/javascript" src="{{asset('assets/layer/layer.js')}}"></script>
@yield('javascript')
<script>
    $(function(){
        // 动态计算新闻列表文字样式
        auto_resize();
        $(window).resize(function() {
            auto_resize();
        });
        $('.am-list-thumb img').load(function(){
            auto_resize();
        });
        $('.pet_article_like li:last-child').css('border','none');
        function auto_resize(){
            $('.pet_list_one_nr').height($('.pet_list_one_img').height());
            // alert($('.pet_list_one_nr').height());
        }
        $('.pet_article_user').on('click',function(){
            if($('.pet_article_user_info_tab').hasClass('pet_article_user_info_tab_show')){
                $('.pet_article_user_info_tab').removeClass('pet_article_user_info_tab_show').addClass('pet_article_user_info_tab_cloes');
            }else{
                $('.pet_article_user_info_tab').removeClass('pet_article_user_info_tab_cloes').addClass('pet_article_user_info_tab_show');
            }
        });

        $('.pet_head_gd_ico').on('click',function(){
            $('.pet_more_list').addClass('pet_more_list_show');
        });
        $('.pet_more_close').on('click',function(){
            $('.pet_more_list').removeClass('pet_more_list_show');
        });
    });
    function postfan(){
        var q=$("#dodfhd").val();
        $.post('{{url('admin/addquestion')}}',{'_token':'{{csrf_token()}}','question':q}, function (res) {
            if(res.status){
                $('#doc-modal-1765').modal('close');
                layer.msg(res.msg);
            }else{
                alert(res.msg);
            }
        });
    }
</script>
<script type="text/javascript">
    function plusReady(){
        plus.key.addEventListener("backbutton",function(){
            history.back(-1);
        });
    }
    if(window.plus){
        plusReady();
    }else{
        document.addEventListener("plusready",plusReady,false);
    }
</script>
</body>
</html>